import request from '@/utils/requset.js'; // 引入封装好的request

// 获取评论
export function getComment(data){
	return request({
		method:"get",
		url:'/comment/getComment?treeHoldId='+data.treeHoldId+'&orderBy='+data.orderBy,
		token:data.token
		
	})
}
// 用户是否喜欢评论
export function isLikeComment(data){
	return request({
		method:"get",
		url:'/comment/isLike?userId='+data.userId+'&commentId='+data.commentId,
		token:data.token
		
	})
}
// 用户点击喜欢
export function clickLikeComment(data){
	return request({
		method:"post",
		url:'/comment/like',
		data:{
			"userId":data.userId,
			"commentId":data.commentId
		},
		token:data.token
		
	})
}
// 评论~回复评论
export function addComment(data){
	return request({
		method:"post",
		url:'/comment/add',
		data:{
			"treeHoldId":data.treeHoldId,
			"content":data.content,
			"authorId":data.authorId,
			"replyId":data.replyId
		},
		token:data.token
		
	})
}